package ru.arriah.servicedesk.bean;

import java.sql.ResultSet;
import java.sql.SQLException;
import ru.arriah.common.bean.GenericBean;

public class ClientTypeBean extends GenericBean {

   private String type;

   public ClientTypeBean() {
      super();
   }
   
   public ClientTypeBean(ResultSet resultSet) {
      fillFromResultSet(resultSet);   
   }

   public String getType() {
      return type;
   }

   public void setType(String type) {
      this.type = type;
   }

   public boolean isValid() {
      return true;
   }

   @Override
   public void fillFromResultSet(ResultSet resultSet) {
      try {
         setId(resultSet.getInt("clienttype.id"));
         setType(resultSet.getString("clienttype.clienttype_name"));
      } catch (SQLException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
      }      
   }

}
